﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GoogleLogger
{
    public partial class UserCred : Form
    {
        private XmlConfig.userInfo m_user;

        public UserCred()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            m_user.userName = txtUserName.Text;
            m_user.userPassword = txtPass.Text;
            this.Hide();
        }

        internal void GetUserData(out XmlConfig.userInfo _User)
        {
            this.ShowDialog();
            _User = new XmlConfig.userInfo();
            _User.userName = txtUserName.Text;
            _User.userPassword = txtPass.Text;
            this.Hide();
        }

        internal void GetUserPass(out XmlConfig.userInfo _User, string strUserName)
        {
            txtUserName.Text = strUserName;
            this.ShowDialog();
            _User = new XmlConfig.userInfo();
            _User.userName = txtUserName.Text;
            _User.userPassword = txtPass.Text;
            this.Hide();
        }
    }
}
